package cn.cxion.chat.app.util;

import android.util.Log;

/**
 * Created by chenxiong on 2017/12/7.
 */

public class LogUtil {

    public static void print(String str){
        getLog(str);
    }
    public static void print(String tag, String str){
        getLog("over="+str);
    }
    public static void print(int str){
        getLog(str+"");
    }
    public static void print(String str, Boolean bol){
        if (bol){
           getLog(str+"ture");
        }else{
           getLog(str+"false");
        }
    }
    //当log超出3400时
    private static void getLog(String i) {
        String str = "";
        if(i==null||i.length()<1)
            return;
        int k = i.length() / 3400;
        for (int j = 0; j <= k; j++) {
            if (j == k) {
                str = i.substring(j * 3400, i.length());
                Log.i("tag123", "info=" + str);
            } else {
                str = i.substring(j * 3400, (j + 1) * 3400);
                Log.i("tag123", "info=" + str);
            }
        }
    }
}
